Handle case where IPostDataElement.Bytes is null#5120
Handle case where IPostDataElement.Bytes is null#5120amaitland merged 1 commit intocefsharp:masterfrom
Conversation
WalkthroughA null check was added to the Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CefSharp/PostDataExtensions.cs (1)
73-81: XML summary now slightly outdated – mention thenullreturn caseThe
<returns>section still states “encoded string” but the method can now (and previously could) returnnullfor both empty andnullbyte arrays. A tiny doc tweak prevents confusion for consumers relying on IntelliSense.- /// <returns>encoded string</returns> + /// <returns> + /// The decoded string, or <c>null</c> if <see cref="IPostDataElement.Bytes"/> is + /// <c>null</c> or empty. + /// </returns>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CefSharp/PostDataExtensions.cs(1 hunks)
🔇 Additional comments (1)
CefSharp/PostDataExtensions.cs (1)
84-87: Fixed potentialNullReferenceException; implementation looks goodEarly-returning when
bytesisnullcloses the loophole that previously led to an NRE and keeps the behaviour consistent with the empty-array case. Nice, minimal patch!
|
✅ Build CefSharp 137.0.100-CI5270 completed (commit 052ebdceb9 by @Matheos96) |
Docstrings generation was requested by @amaitland. * #5120 (comment) The following files were modified: * `CefSharp/PostDataExtensions.cs`
|
Note Generated docstrings for this pull request at #5121 |
|
Nice one! Thanks |
Summary: [summary of the change and which issue is fixed here]
Changes: [specify the structures changed]
How Has This Been Tested?
By calling .GetBody() on a IPostDataElement object with PostDataType.Empty and Bytes = null.
Types of changes
Checklist: